

import 'dart:async';
import 'package:flutter_flexible/utils/gps/gps_util.dart';
import 'package:flutter_flexible/utils/index.dart';

class GpsTimerConfig{

  void init(){
    GpsUtil.determinePosition();
    Timer.periodic(const Duration(seconds: 5), (timer) {
      var determinePosition = GpsUtil.determinePosition();
      determinePosition.then((p){
        LogUtil.d("GpS Timer 读取位置：${p.latitude} , ${p.longitude}");
      });
    });
  }

}


GpsTimerConfig gpsTimerConfig = GpsTimerConfig();
